lst =[]
for i in range(1,10):
    # list.append(i)
    # if i % 2 == 0:
    #     list.append(i)
    if i % 2 ==1:
        lst.append(i)

print(list)
print("______________________________")
#列表推导式
lst = [ele for ele in range(1,10)]
lst = [ele for ele in range(1,10) if ele % 2 == 0]
lst = [ele for ele in range(1,10) if ele % 2  == 1]
print(lst,type(lst))
print("______________________________")
#元组推到式
tup = (ele for ele in range(1,10))
tup = (ele for ele in range(1,10) if ele % 2 == 0)
tup = (ele for ele in range(1,10) if ele % 2  == 1)
print( tuple(tup),type(tup))
print("______________________________")
#集合推导式
ss = {ele for ele in range(1,10)}
ss = {ele**2 for ele in range(1,10) if ele % 2 == 0}
# ss = {ele**2 for ele in range(1,10) if ele % 2  == 1}
print(ss,type(ss))
print("______________________________")
#字典推导式
# _dict = {key for key in range(1,10)}
_dict = {key:str(key**2) for key in range(1,10) if key % 2 == 0}
print(_dict,type(_dict))
print("______________________________")
# lis = ["张三","李四","王五"]
# lis1 = [13,14,15]
# # print(list(zip(lis,lis1)))
# # _ict ={ itm for itm in zip(lis,lis1)}
# _ict= {k:v for k,v in zip(lis,lis1)}
# print(_ict)
# print("______________________________")
# lst2 = [" 张三 "," 李四 "," 王五 "]
# # lisst = [name.strip() for name in lst2]
# # lstst = [lst2.strp()]
# io = {name.strip() for name in lst2}
# print(io)

